12. Errors and Exceptions

Which of the following statements are true? (Check all that apply.)

SOLUTION:
  • Any syntax error can be detected before running your program.
  • An exception occurs during run time.
  • There are many types of exceptions.

QUIZ QUESTION::

Here are some of the common exceptions programmers run into in Python. Do some research online to match the appropriate description for each.

ANSWER CHOICES:



Built-in Exception

Description

ValueError

AssertionError

IndexError

KeyError

TypeError

SOLUTION:

Built-in Exception

Description

ValueError

KeyError

IndexError

AssertionError

TypeError